package com.mis.clothespos.clothestype.controller;




import com.mis.clothespos.clothestype.domain.clothestype;
import com.mis.clothespos.clothestype.service.IclothestypeService;
import com.mis.clothespos.common.AjaxResult;
import com.mis.clothespos.common.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/clothestype")
public class ClothestypeController extends BaseController {

    @Autowired
    IclothestypeService c_service;

    @PostMapping("/add")
    @ResponseBody
    public AjaxResult addSave(clothestype clothestype)
    {
        return toAjax(c_service.insert(clothestype));
    }

    @GetMapping("/selectClothesType")
    @ResponseBody
    public AjaxResult selectClothesType(){
        AjaxResult result=new AjaxResult();
        return result.put("clothesType",c_service.selectClothesType());
    }




}
